from hz_utils.baidu import Baidu


def test_baidu_result():
    baidu = Baidu()
    keyword = "美利坚"
    result = baidu.search(keyword)
    assert result
    for i, r in enumerate(result):
        print("%d. " % i, r["title"])
    assert result[0]["title"]
    assert result[0]["url"]
    assert result[0]["brief"]
